package cn.doitedu.util

import org.apache.log4j.{Level, Logger}
import org.apache.spark.sql.SparkSession

/**
 * @Date 22.4.10
 * @Created by HANGGE
 * @Description
 */
object SparkUtil {
  Logger.getLogger("org").setLevel(Level.ERROR)

  /**
   * 获取SparkSession环境对象
   * @return
   */
  def  getSession:SparkSession={
    SparkSession
      .builder()
      .master("local[*]")
      .appName("获取 spark-sql环境")
      .config("", "")
      // 添加对hive的支持
      // .enableHiveSupport()
      .getOrCreate()
  }

}
